import { createRouter,createWebHistory,RouteRecordRaw } from "vue-router";


const routes: Array<RouteRecordRaw> = [
    //默认路由
    // {
    //     path: '/',
    //     name: 'HelloWorld',
    //     component: () => import('../components/HelloWorld.vue')
    // },
    {
        path: '/',
        name: 'Home',
        component: () => import('../view/Home.vue')
    },

    //用户路由
    {
        path: '/Register',
        name: 'Register',
        component: () => import('../view/User/Register.vue')
    },
    {
        path: '/Login',
        name: 'Login',
        component: () => import('../view/User/Login.vue')
    },
    {
        path: '/Details/:id',
        name: 'Details',
        component: () => import('../view/User/Details.vue')
    },
    {
        path: '/DetailsShow',
        name: 'DetailsShow',
        component: () => import('../view/User/DetailsShow.vue')
    },

    //投资路由
    {
        path: '/InvestAdd',
        name: 'InvestAdd',
        component: () => import('../view/User/Invest/InvestAdd.vue')
    },
    {
        path: '/InvestShow',
        name: 'InvestShow',
        component: () => import('../view/User/Invest/InvestShow.vue')
    },
    {
        path: '/InvestUpd/:id',
        name: 'InvestUpd',
        component: () => import('../view/User/Invest/InvestUpd.vue')
    },
    {
        path: '/InvestShowUser',
        name: 'InvestShowUser',
        component: () => import('../view/User/Invest/InvestShowUser.vue')

    },
    {
        path: '/InvestAddUser/:id',
        name: 'InvestAddUser',
        component: () => import('../view/User/Invest/InvestAddUser.vue')
    },
    {
        path: '/InvestShowMaster',
        name: 'InvestShowMaster',
        component: () => import('../view/User/Invest/InvestShowMaster.vue')
    },
    {
        path: '/InvestAddMaster/:id',
        name: 'InvestAddMaster',
        component: () => import('../view/User/Invest/InvestAddMaster.vue')
    },

    //理财路由
    {
        path: '/FinanAdd',
        name: 'FinanAdd',
        component: () => import('../view/Finan/FinanAdd.vue')
    },
    {
        path: '/FinanShow',
        name: 'FinanShow',
        component: () => import('../view/Finan/FinanShow.vue')
    },
    {
        path: '/FinanUpd/:id',
        name: 'FinanUpd',
        component: () => import('../view/Finan/FinanUpd.vue')
    },
    {
        path: '/FinanShowUser',
        name: 'FinanShowUser',
        component: () => import('../view/Finan/FinanShowUser.vue')
    },
    {
        path: '/FinanAddUser/:id',
        name: 'FinanAddUser',
        component: () => import('../view/Finan/FinanAddUser.vue')
    },




    //借款路由
    {
        path: '/BorrowAdd',
        name: 'BorrowAdd',
        component: () => import('../view/Borrow/BorrowAdd.vue')
    },
    {
        path: '/BorrowShow',
        name: 'BorrowShow',
        component: () => import('../view/Borrow/BorrowShow.vue')
    },




]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router